import request from '@/plugin/axios'

export function AccountLogin (data) {
  return request({
    url: '/oauth/token?_allow_anonymous=true&loginType=0&grant_type=password&client_id=client_2&client_secret=secret',
    method: 'get',
    params: data
  })
}

export function getShopList (token) {
  return request({
    url: '/user/shops',
    method: 'get',
    headers: {Authorization: "bearer " + token}
  })
}

export function selectShop (token, data) {
  return request({
    url: '/microprogram/chooseBrowsedShop?shopId=' + data,
    method: 'post',
    headers: {Authorization: "bearer " + token}
  })
}

export function getloginOnUser (token) {
  return request({
    url: '/user/getloginOnUser',
    method: 'get',
    headers: {Authorization: "bearer " + token}
  })
}
